<html>
<head><meta charset="utf-8"><title>Where are type annotations stored? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Where.20are.20type.20annotations.20stored.3F.html">Where are type annotations stored?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="199262247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Where%20are%20type%20annotations%20stored%3F/near/199262247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Where.20are.20type.20annotations.20stored.3F.html#199262247">(May 30 2020 at 15:35)</a>:</h4>
<p>When something like <code>|x: usize| x + 1</code> gets compiled, where are the type annotations stored?</p>



<a name="199262391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Where%20are%20type%20annotations%20stored%3F/near/199262391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Where.20are.20type.20annotations.20stored.3F.html#199262391">(May 30 2020 at 15:38)</a>:</h4>
<p>If you have the def id of the closure, you can use <code>tcx.typeck_tables_of(def_id)</code></p>



<a name="199262415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Where%20are%20type%20annotations%20stored%3F/near/199262415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Where.20are.20type.20annotations.20stored.3F.html#199262415">(May 30 2020 at 15:39)</a>:</h4>
<p>thanks!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>